﻿using AF_Application.Interface.App;
using AF_Application.Interface.Cache;
using AF_Application.Interface.Domain;
using AF_Application.Interface.Log;
using AF_Application.Interface.Repertory;
using AF_IOC;
using AF_Lucky;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApp_Standard
{
    public partial class Test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //IAppImpl App = IOC.Instance.Get<IAppImpl>();
            //ICacheProvider CacheProvider = IOC.Instance.Get<ICacheProvider>();
            //ILogProvider LogProvider = IOC.Instance.Get<ILogProvider>();
            //ISessionCacheProvider SessionCacheProvider = IOC.Instance.Get<ISessionCacheProvider>();

            //IDBRepertory DBRepertory = IOC.Instance.Get<IDBRepertory>();
            //IDefaultDomain DefaultDomain = IOC.Instance.Get<IDefaultDomain>();

            //SessionCacheProvider.Set<string>("Test", App.GetHashCode().ToString());

            //Response.Write("IOC主对象：" + IOC.Instance.GetHashCode() + "<br/>");
            //Response.Write("App：" + App.GetHashCode() + "<br/>");
            //Response.Write("DefaultDomain：" + DefaultDomain.GetHashCode() + "<br/>");
            //Response.Write("DBRepertory：" + DBRepertory.GetHashCode() + "<br/>");
            //Response.Write("CacheProvider：" + CacheProvider.GetHashCode() + "<br/>");
            //Response.Write("SessionCacheProvider：" + SessionCacheProvider.GetHashCode() + "<br/>");
            //Response.Write("LogProvider：" + LogProvider.GetHashCode() + "<br/>");
            //Response.Write("SessionCache读取：" + SessionCacheProvider.Get<string>("Test") + "<br/>");

            //抽奖中心.注册用户
            //LuckyCenter LC = new LuckyCenter();
            //PlayerRegResult result = LC.RegUser(new PlayerInfo()
            //{
            //    ActionID = Guid.Parse("6cd7eba7-bbca-4d63-9b8e-5baa6453f0b6"),
            //    Address = "测试地址",
            //    City = "重庆",
            //    CreateTime = DateTime.Now,
            //    EMail = "123@qq.com",
            //    HeadImg = "http://1111.com/xxx.jpg",
            //    Id = Guid.NewGuid(),
            //    IP = "0.0.0.1",
            //    Name = "测试中奖者",
            //    NickName = "无敌",
            //    OpenID = "111",
            //    Other1 = "",
            //    Other2 = "",
            //    Other3 = "",
            //    Other4 = "",
            //    Other5 = "",
            //    Phone = "186000000",
            //    Province = "重庆",
            //    QQ = "3446799",
            //    Sex = "男",
            //    WeiXin = "xxxx"
            //});
            //Response.Write(result.Message);

            //抽奖中心.抽奖
            //LuckyCenter LC = new LuckyCenter();
            //LuckyResult result = LC.Lucky(Guid.Parse("00000000-0000-0000-0000-000000000001"), "test01", "0.0.0.1");
        }
    }
}